<?php

$case_login = (strtolower($Page->getController()) == 'auth') && (($Page->getAction() == 'login') || ($Page->getAction() == 'register'));
$case_init = (strtolower($Page->getController()) == 'init') && ($Page->getAction() == 'init');
if (Auth::o()->is('guest') && !$case_login && !$case_init) {
    ?><div class="login-block b_m1"><?php
        ?><?=$editForm->create('none', array('url'=>'/login/', 'formStyle'=>'inner'));?><?php
            ?><?=$editForm->text('username', __d('auth', 'username', true), array('vertical'=>true, 'size'=>15));?><?php
            ?><?=$editForm->field('password', __d('auth', 'password', true), $form->password('password', array('div'=>false, 'size'=>15)), array('vertical'=>true));?><?php
            ?><?=$editForm->cell($editForm->submit(__d('auth', 'enter', true)));?><?php
        ?><?=$editForm->end();?><?php
        foreach (Layout::o()->widget['menu']->getByTags(array('auth')) as $menuItem) {
            if ($menuItem->ident == 'register') {
                ?><div class="t_m1 "><?php
                    ?><?=$html->link($menuItem->title, $menuItem->url_with_params);?><?php
                ?></div><?php
            }
        }
    ?></div><?php
}

?>
